using Google.Protobuf;
using Google.Protobuf.Collections;
using Google.Protobuf.Reflection;
using System.Collections.Generic;




public partial struct FixedFloat :ISerializeStruct 
{

	public static FixedFloat NewEntity()
	{
		return new FixedFloat();
	}

	public  void Read(byte[] bytes)
	{
		if(bytes == null) return;
		FixedFloat_Data data = CommonFunctions.Deserialize<FixedFloat_Data>(bytes);
		this._value = data.Value;
	}

	public  byte[] Write()
	{
		FixedFloat_Data data = new FixedFloat_Data();
		data.Value = this._value;
		return CommonFunctions.Serialize(data);
	}
}




public partial struct FixedVec2 :ISerializeStruct 
{

	public static FixedVec2 NewEntity()
	{
		return new FixedVec2();
	}

	public  void Read(byte[] bytes)
	{
		if(bytes == null) return;
		FixedVec2_Data data = CommonFunctions.Deserialize<FixedVec2_Data>(bytes);
		this.x.Read(data.X.ToByteArray());
		this.y.Read(data.Y.ToByteArray());
	}

	public  byte[] Write()
	{
		FixedVec2_Data data = new FixedVec2_Data();
		data.X = ByteString.CopyFrom(this.x.Write());
		data.Y = ByteString.CopyFrom(this.y.Write());
		return CommonFunctions.Serialize(data);
	}
}




public partial struct FixedVec3 :ISerializeStruct 
{

	public static FixedVec3 NewEntity()
	{
		return new FixedVec3();
	}

	public  void Read(byte[] bytes)
	{
		if(bytes == null) return;
		FixedVec3_Data data = CommonFunctions.Deserialize<FixedVec3_Data>(bytes);
		this.x.Read(data.X.ToByteArray());
		this.y.Read(data.Y.ToByteArray());
		this.z.Read(data.Z.ToByteArray());
	}

	public  byte[] Write()
	{
		FixedVec3_Data data = new FixedVec3_Data();
		data.X = ByteString.CopyFrom(this.x.Write());
		data.Y = ByteString.CopyFrom(this.y.Write());
		data.Z = ByteString.CopyFrom(this.z.Write());
		return CommonFunctions.Serialize(data);
	}
}




public partial struct FixedVec4 :ISerializeStruct 
{

	public static FixedVec4 NewEntity()
	{
		return new FixedVec4();
	}

	public  void Read(byte[] bytes)
	{
		if(bytes == null) return;
		FixedVec4_Data data = CommonFunctions.Deserialize<FixedVec4_Data>(bytes);
		this.x.Read(data.X.ToByteArray());
		this.y.Read(data.Y.ToByteArray());
		this.z.Read(data.Z.ToByteArray());
		this.w.Read(data.W.ToByteArray());
	}

	public  byte[] Write()
	{
		FixedVec4_Data data = new FixedVec4_Data();
		data.X = ByteString.CopyFrom(this.x.Write());
		data.Y = ByteString.CopyFrom(this.y.Write());
		data.Z = ByteString.CopyFrom(this.z.Write());
		data.W = ByteString.CopyFrom(this.w.Write());
		return CommonFunctions.Serialize(data);
	}
}




public partial struct ZMatrix4X4 :ISerializeStruct 
{

	public static ZMatrix4X4 NewEntity()
	{
		return new ZMatrix4X4();
	}

	public  void Read(byte[] bytes)
	{
		if(bytes == null) return;
		ZMatrix4X4_Data data = CommonFunctions.Deserialize<ZMatrix4X4_Data>(bytes);
		this.m_Col1.Read(data.MCol1.ToByteArray());
		this.m_Col2.Read(data.MCol2.ToByteArray());
		this.m_Col3.Read(data.MCol3.ToByteArray());
		this.m_Col4.Read(data.MCol4.ToByteArray());
	}

	public  byte[] Write()
	{
		ZMatrix4X4_Data data = new ZMatrix4X4_Data();
		data.MCol1 = ByteString.CopyFrom(this.m_Col1.Write());
		data.MCol2 = ByteString.CopyFrom(this.m_Col2.Write());
		data.MCol3 = ByteString.CopyFrom(this.m_Col3.Write());
		data.MCol4 = ByteString.CopyFrom(this.m_Col4.Write());
		return CommonFunctions.Serialize(data);
	}
}


